const version = require('../util/baseUtil/ApiVersion');
const express = require('express');
const errors = require('../errors');
version.use({
    'header': 'Api-Version',
    'grab': /(\d+\.\d+)/,
    'error': new errors.BadRequestError('请尝试更新到最新版本'),
});
const app_version_router = express.Router().use(version.reroute("1.0", {
    "1.0": require('./v1.0/route_api'),

}));
module.exports = function(app) {
    app.use('/api', app_version_router);
};